package com.tengju.data.domain.model.exchvesion;


import lombok.AllArgsConstructor;

@AllArgsConstructor
public enum SyncStatus {

    SYNC_READY(10,"同步准备"),
    SYNC_SUCCESS(20,"同步成功");

    private int code;
    private String desc;

    public int getCode() {
        return code;
    }

    public String getDesc() {
        return desc;
    }

    public static SyncStatus fromVal(Integer val) {
        if (val == null) {
            return null;
        }
        for (SyncStatus type : values()) {
            if (type.code == val) {
                return type;
            }
        }
        return null;
    }

}
